/*#include<stdio.h>
#include<windows.h>
#define n 80
void rank(int arrey[n]);
int num, i, j;			        //定义一个全局变量便于在封装函数中使用

int main()
{
	int end = 1,arrey[n];

	int **pointer;				//指向指针的指针

	while (end == 1)
	{
		//input
		printf_s("How many numbers do you want to rank:\n");
		scanf_s("%d",&num);
		
		printf_s("Please enter in a row of number:");
		
		for (i = 0; i < num; i++)
			scanf_s("%d", &arrey[i]);
		
		//Use the function to order the row of number.
		rank(arrey);

		//output
		pointer = arrey;
		for (i = 0; i < num ; i++)
		{
			printf_s("%d\t", *(pointer++));				//用指针指向数组的自增来输出
		}

		printf_s("\nenter 1 to continue or enter 0 to end it:");
		scanf_s("%d", &end);
	}
	system("pause");
	return 0;
}

void rank(int arrey[n])
{
	int temp;
	printf_s("The correct order is:\n\t");
	for (i = 0; i < num - 1; i++)
	{
		for (j = i + 1; j < num; j++)
		{
			if (arrey[i]>arrey[j])
			{
				temp = arrey[i];
				arrey[i] = arrey[j];
				arrey[j] = temp;

			}
		}
	}
}*/